package com.water.camera.fragment;

import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.water.camera.databinding.DialogDmEditWaterBinding;

public class EditTypeDlg extends FullScreenDlg {

    DialogDmEditWaterBinding binding;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        binding = DialogDmEditWaterBinding.inflate(inflater, container, false);
        binding.constantAddEdityin.setOnClickListener(v -> dismiss(true, 0));
        binding.constantBatchEdityin.setOnClickListener(v -> dismiss(true, 2));
        return binding.getRoot();
    }

    @Override
    protected int getHeight() {
        getDialog().getWindow().setGravity(Gravity.BOTTOM);
        return ViewGroup.LayoutParams.WRAP_CONTENT;
    }
}
